import { EnhanceAppContext,useData,inBrowser } from "vitepress"
import {watchEffect} from "vue"
import DefaultTheme from "vitepress/theme";
import "uno.css"
import "./style.css"
export default {
    ...DefaultTheme,
    enhanceApp(ctx:EnhanceAppContext){
        DefaultTheme.enhanceApp(ctx)
    },
    setup() {
      const { lang } = useData()
      watchEffect(() => {
        if (inBrowser) {
          document.cookie = `nf_lang=${lang.value}; expires=Mon, 1 Jan 2024 00:00:00 UTC; path=/`
        }
      })
    }
}